﻿function fileBrowser(field_name, url, type, win) {
    if (type == "file")
        var cmsURL = "[[FullPath]]" + "Admin/TinyMCEIntegration/ExplorerPopup.aspx?v=21&type=" + type + "&localeid=[[LocaleID]]";
    else {
        if (type == "content")
            var cmsURL = "[[FullPath]]" + "Admin/TinyMCEIntegration/SearchContentPopup.aspx?v=21&type=" + type;
        else
            var cmsURL = "[[FullPath]]" + "Admin/TinyMCEIntegration/MediaPopup.aspx?v=21&type=" + type;
    }
    tinyMCE.activeEditor.windowManager.open({
        file: cmsURL,
        title: "",
        width: 900, 
        height: 500,
        resizable: "yes",
        inline: "yes", 
        close_previous: "no"
    }, {
        window: win,
        input: field_name
    });
    return false;
}
